﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Clinica/MasterPageProgramacion.master" AutoEventWireup="true" CodeFile="wfEmpleadoListado.aspx.cs" Inherits="Ventas_wfEmpleadoListado" %>

<%@ Register Assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>

<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }        
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentMenuSecundario" Runat="Server">
    <li><a href="wfMedicoListado.aspx" class="">Médico</a></li>
    <li><a href="wfEmpleadoListado.aspx" class="active">Empleado</a></li>
    <li><a href="wfTurnoListado.aspx" class="">Turno</a></li>
    <li><a href="wfProgramacionListado.aspx" class="">Programación</a></li>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ModuleTitleContent" Runat="Server">
    Empleado
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentEnlacesRapidos" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="MainContent" Runat="Server">
    <script language="javascript" type="text/javascript">

        function confirmSubmit() {
//            $.prompt('Está seguro de querer eliminar el empleado?'
//            , {
//                buttons: { Ok: true, Cancel: false }
//                , prefix: 'cleanblue'
//                , callback: confirmSubmitResult
//            }
//        );
            //            return false;

            pcEliminar.Show();

        }

        function confirmSubmitResult() {            
                $('#<%= btnAnulacion.ClientID %>').click();
        }    
    </script>
    <ul class="tabs primary">
        <li class="active"><a href="wfEmpleadoListado.aspx">Listado de Empleados</a></li>
        <li><a href="wfEmpleado.aspx">Registrar Empleado</a></li>
    </ul>
    <h4>Listado de Empleados</h4>
    <table width="99%">
        <tr>
            <td>
                <dx:ASPxPanel ID="ASPxPanel1" runat="server" Width="99%">
                    <PanelCollection>
                        <dx:PanelContent ID="PanelContent1" runat="server" SupportsDisabledAttribute="True">
                            <table>
                                <tr>
                                    <td>
                                        <dx:ASPxButton ID="ASPxButton1" runat="server" ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                                            CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                            Text="Agregar" OnClick="ASPxButton1_Click">
                                        </dx:ASPxButton>
                                    </td>
                                    <td>
                                        <dx:ASPxButton ID="ASPxButton2" runat="server" ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                                            CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                            Text="Modificar" OnClick="ASPxButton2_Click">
                                        </dx:ASPxButton>
                                    </td>
                                    <%--<td>
                                        <dx:ASPxButton ID="ASPxButton3" runat="server" ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                                            CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                            Text="Eliminar" Native="True" OnClick="ASPxButton3_Click">
                                        </dx:ASPxButton>
                                    </td>--%>
                                    <td>
                                    <dx:ASPxButton ID="btnAnular" runat="server" AutoPostBack="False" 
                                                ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" 
                                                CssPostfix="PlasticBlue" 
                                                SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" 
                                            Text="Eliminar">
                                                <ClientSideEvents Click="function(s, e) {
	return confirmSubmit();
}" />
                                            </dx:ASPxButton>
                                    </td>
                                    <td>
                                    <asp:Button ID="btnAnulacion" runat="server" BackColor="#99CCFF" Style="display: none;"
                                                Text="Anular" OnClick="btnAnulacion_Click" />
                                    </td>
                                </tr>
                            </table>
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxPanel>
            </td>
        </tr>
        <tr>
            <td>
                <dx:ASPxGridView ID="dgEmpleado" runat="server" ClientIDMode="AutoID" 
                    CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
                    Width="99%" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" 
                    KeyFieldName="EMP_ID_EMPLEADO">
                    <Columns>
                        <dx:GridViewDataTextColumn Caption="Cod" FieldName="EMP_ID_EMPLEADO" 
                            VisibleIndex="0">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Apellido Paterno" 
                            FieldName="EMP_APELLIDO_PATERNO" VisibleIndex="1">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Apellido Materno" 
                            FieldName="EMP_APELLIDO_MATERNO" VisibleIndex="2">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Nombres" FieldName="EMP_NOMBRES" 
                            VisibleIndex="3">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="DNI" FieldName="EMP_DNI" VisibleIndex="4">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Cod. Planilla" 
                            FieldName="EMP_CODIGO_PLANILLA" VisibleIndex="5">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataDateColumn Caption="Fecha Ingreso" 
                            FieldName="EMP_FECHA_INGRESO" VisibleIndex="6">
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataTextColumn Caption="Tipo Codicion Trabajo" 
                            FieldName="TCT_ID_TIPO" VisibleIndex="7">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Tipo Empleado" FieldName="TIPE_ID_TIPO" 
                            VisibleIndex="8">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Estado Civil" 
                            FieldName="TEC_ID_TIPO_ESTADO_CIVIL" VisibleIndex="9">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Estado" FieldName="ESTE_ID_ESTADO" 
                            VisibleIndex="12">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Sexo" FieldName="TIPS_ID_TIPO_SEXO" 
                            VisibleIndex="14">
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <SettingsBehavior AllowFocusedRow="True" AllowSelectByRowClick="True" />
                    <SettingsPager ShowDefaultImages="False">
                        <AllButton Text="All">
                        </AllButton>
                        <NextPageButton Text="Next &gt;">
                        </NextPageButton>
                        <PrevPageButton Text="&lt; Prev">
                        </PrevPageButton>
                    </SettingsPager>
                    <Settings ShowFilterRow="True" ShowGroupPanel="True" />
                    <Images SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css">
                        <LoadingPanelOnStatusBar Url="~/App_Themes/PlasticBlue/GridView/gvLoadingOnStatusBar.gif">
                        </LoadingPanelOnStatusBar>
                        <LoadingPanel Url="~/App_Themes/PlasticBlue/GridView/Loading.gif">
                        </LoadingPanel>
                    </Images>
                    <ImagesFilterControl>
                        <LoadingPanel Url="~/App_Themes/PlasticBlue/Editors/Loading.gif">
                        </LoadingPanel>
                    </ImagesFilterControl>
                    <Styles CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" 
                        CssPostfix="PlasticBlue">
                        <Header ImageSpacing="10px" SortingImageSpacing="10px">
                        </Header>
                    </Styles>
                    <StylesEditors>
                        <CalendarHeader Spacing="11px">
                        </CalendarHeader>
                        <ProgressBar Height="25px">
                        </ProgressBar>
                    </StylesEditors>
                </dx:ASPxGridView>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                    SelectMethod="listar" TypeName="Negocio.Clases_BL.clsGen_EmpleadoBL">
                </asp:ObjectDataSource>
            </td>

        </tr>
    </table>


    <dx:ASPxPopupControl ID="pcEliminar" runat="server"
        ClientInstanceName="pcEliminar" Modal="True" 
        PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" CssPostfix="PlasticBlue"
        CloseAction="CloseButton" HeaderText="Eliminar" Width="350px" 
        AllowResize="True" AllowDragging="True" DragElement="Window" 
        MinHeight="100px">
            <HeaderImage Url="~/Imagenes/delete2.png" Width="20px">
            </HeaderImage>
            <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <table width="100%">
        <tr>
            <td colspan="2" style="padding:0 0 0 20px;">
                Está seguro de querer eliminar el empleado?<hr />
            </td>
        </tr>
        <tr>
            <td align="right" style="padding:0 20px 0 0;">
                <dx:ASPxButton ID="btnAceptarEliminar" runat="server" AutoPostBack="False" 
                    ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" 
                    CssPostfix="PlasticBlue" 
                    SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Text="Aceptar" 
                    Checked="True">
                    <ClientSideEvents Click="function(s, e) {
	pcEliminar.Hide();
	confirmSubmitResult();    
}" />
                    <CheckedStyle BackColor="#000066" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </CheckedStyle>
                    <HoverStyle BackColor="#000099" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </HoverStyle>
                </dx:ASPxButton>
            </td>
            <td align="left" style="padding:0 0 0 20px;">
                <dx:ASPxButton ID="btnCancelarEliminar" runat="server" AutoPostBack="False" 
                    ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" 
                    CssPostfix="PlasticBlue" 
                    SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" 
                    Text="Cancelar" Checked="True">
                    <ClientSideEvents Click="function(s, e) {
	pcEliminar.Hide();
}" />
                    <CheckedStyle BackColor="#000066" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </CheckedStyle>
                    <HoverStyle BackColor="#000099" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </HoverStyle>
                </dx:ASPxButton>
            </td>
        </tr>
    </table>
                </dx:PopupControlContentControl>
</ContentCollection>
            </dx:ASPxPopupControl>


    <dx:ASPxPopupControl ID="pcMensaje" runat="server" 
        ClientInstanceName="pcMensaje" Modal="True" 
        PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
        CloseAction="CloseButton" HeaderText="Mensaje" Width="420px" 
        EnableViewState="False" AllowResize="True" CssPostfix="PlasticBlue" 
        AllowDragging="True" DragElement="Window" EnableTheming="True">
            <HeaderImage Url="~/Imagenes/iconError.png">
            </HeaderImage>
            <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <table class="style1">
        <tr>
            <td style="padding:0 0 0 20px;">
                <dx:ASPxLabel ID="lblMensaje" runat="server" /><hr />
            </td>
        </tr>
        <tr>
            <td align="center">
                <dx:ASPxButton ID="btnAceptar" runat="server" AutoPostBack="False" 
                    ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" 
                    CssPostfix="PlasticBlue" 
                    SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Text="Aceptar" 
                    Checked="True">
                    <ClientSideEvents Click="function(s, e) {
	pcMensaje.Hide();   
}" />
                    <CheckedStyle BackColor="#000066" Font-Bold="True" Font-Italic="False" 
                        Font-Names="Georgia" Font-Strikeout="False" ForeColor="White">
                    </CheckedStyle>
                    <HoverStyle BackColor="#000099" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </HoverStyle>
                </dx:ASPxButton>
                
            </td>
        </tr>
    </table>
                </dx:PopupControlContentControl>
</ContentCollection>
            </dx:ASPxPopupControl>


</asp:Content>

